<?php if (!defined('THINK_PATH')) exit();?>
    <div class="panel panel-primary" id="js_album">
        <div class="panel-heading">
            图片展示  &nbsp;
            <button type="submit" class="btn btn-default" id="js_addphoto">添加图片</button>
        </div>
        <div class="panel-body">
            <?php if(!empty($list)): if(is_array($list)): foreach($list as $key=>$v): ?><div class="col-xs-12 col-sm-6 col-md-4">
                        <div class="thumbnail">
                            <img src="/Album<?php echo ($v['name']); ?>" alt="" style="height:350px;">
                        </div>
                    </div><?php endforeach; endif; ?>
                <?php else: ?>
                没有图片<?php endif; ?>
        </div>
    </div>
    <div class="modal fade" id="myModal1">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">添加图片</h4>
                </div>
                <div class="modal-body">
                    <form action="<?php echo U('Index/addphoto');?>" method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="exampleInputFile">图片</label>
                            <input type="hidden" name="id" value="<?php echo ($id); ?>"/>
                            <input type="file" id="exampleInputFile" name="face"/>
                            <p class="help-block">Example block-level help text here.</p>
                        </div>
                        <button type="submit" class="btn btn-primary">添加</button>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
    <script>
        $("#js_addphoto").click(function(){
            $('#myModal1').modal('show');
        })
    </script>